package l2qse.authserver.network.gamecomm.gs2as;

import l2qse.authserver.accounts.Account;
import l2qse.authserver.network.gamecomm.ReceivablePacket;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author Ro0TT
 * @date 2.2.2012
 **/

public class PremiumPointsRequest extends ReceivablePacket
{
	private static final Logger log = LoggerFactory.getLogger(PremiumPointsRequest.class);

	private String account;
	private long points;

	@Override
	protected void readImpl()
	{
		account = readS();
		points = readQ();
	}

	@Override
	protected void runImpl()
	{
		Account acc = new Account(account);
		acc.restore();
		acc.setPremiumPoints(points);
		acc.update();
	}
}
